home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIProxyAutoConfig.idl < prev    next >
Text File  |  2006-05-08  |  4KB  |  104 lines

  1. /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 1998
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *   Gagan Saksena <gagan@netscape.com> (original author)
  24.  *   Denis Antrushin <adu@sparc.spb.su>
  25.  *   Darin Fisher <darin@netscape.com>
  26.  *
  27.  * Alternatively, the contents of this file may be used under the terms of
  28.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  29.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  30.  * in which case the provisions of the GPL or the LGPL are applicable instead
  31.  * of those above. If you wish to allow use of your version of this file only
  32.  * under the terms of either the GPL or the LGPL, and not to allow others to
  33.  * use your version of this file under the terms of the MPL, indicate your
  34.  * decision by deleting the provisions above and replace them with the notice
  35.  * and other provisions required by the GPL or the LGPL. If you do not delete
  36.  * the provisions above, a recipient may use your version of this file under
  37.  * the terms of any one of the MPL, the GPL or the LGPL.
  38.  *
  39.  * ***** END LICENSE BLOCK ***** */
  40.  
  41. #include "nsISupports.idl"
  42.  
  43. /** 
  44.  * The nsIProxyAutoConfig interface is used for setting arbitrary proxy
  45.  * configurations based on the specified URL. 
  46.  *
  47.  * Note this interface wraps (at least in the implementation) the older
  48.  * hacks of proxy auto config. 
  49.  *
  50.  *  - Gagan Saksena 04/23/00 
  51.  */
  52.  
  53. [scriptable, uuid(a42619df-0a1c-46fb-8154-0e9b8f8f1ea8)]
  54. interface nsIProxyAutoConfig : nsISupports
  55. {
  56.     /**
  57.      * This method initializes the object.  This method may be called multiple
  58.      * times.  If either parameter is an empty value, then the object is
  59.      * reset to its initial state.
  60.      *
  61.      * @param aPACURI
  62.      *        URI used to fetch the PAC script.  This is needed for properly
  63.      *        constructing the JS sandbox used to evaluate the PAC script.
  64.      * @param aPACScript
  65.      *        Javascript program text.
  66.      */
  67.     void init(in ACString aPACURI, in AString aPACScript);
  68.  
  69.     /**
  70.      * Get the proxy string for the specified URI.  The proxy string is
  71.      * given by the following:
  72.      *   
  73.      *   result      = proxy-spec *( proxy-sep proxy-spec )
  74.      *   proxy-spec  = direct-type | proxy-type LWS proxy-host [":" proxy-port]
  75.      *   direct-type = "DIRECT"
  76.      *   proxy-type  = "PROXY" | "SOCKS" | "SOCKS4" | "SOCKS5"
  77.      *   proxy-sep   = ";" LWS
  78.      *   proxy-host  = hostname | ipv4-address-literal
  79.      *   proxy-port  = <any 16-bit unsigned integer>
  80.      *   LWS         = *( SP | HT )
  81.      *   SP          = <US-ASCII SP, space (32)>
  82.      *   HT          = <US-ASCII HT, horizontal-tab (9)>
  83.      *
  84.      * NOTE: direct-type and proxy-type are case insensitive
  85.      * NOTE: SOCKS implies SOCKS4
  86.      *
  87.      * Examples:
  88.      *   "PROXY proxy1.foo.com:8080; PROXY proxy2.foo.com:8080; DIRECT"
  89.      *   "SOCKS socksproxy"
  90.      *   "DIRECT"
  91.      *
  92.      * XXX add support for IPv6 address literals.
  93.      * XXX quote whatever the official standard is for PAC.
  94.      *
  95.      * @param aTestURI
  96.      *        The URI as an ASCII string to test.
  97.      * @param aTestHost
  98.      *        The ASCII hostname to test.
  99.      *
  100.      * @return PAC result string as defined above.
  101.      */
  102.     ACString getProxyForURI(in ACString aTestURI, in ACString aTestHost);
  103. };
  104.